import React from 'react';
import classNames from 'classnames';

import './index.scss';

export interface IconProps extends React.HTMLAttributes<HTMLSpanElement> {
    /**
     * 是否支持渐变色
     */
    gradient?: boolean;
}

/**
 * @deprecated 后续迁移至 icon 库
 */
export function AssistantAvatarIcon({ className, ...rest }: IconProps) {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg
                xmlns="http://www.w3.org/2000/svg"
                width="1em"
                height="1em"
                viewBox="0 0 16 16"
                fill="none"
            >
                <path
                    fillRule="evenodd"
                    clipRule="evenodd"
                    d="M13.2249 2.24668C12.5545 1.83267 11.6454 1.84694 10.6692 2.13558C10.482 1.96208 10.2315 1.85602 9.95613 1.85602C9.37667 1.85602 8.90692 2.32577 8.90692 2.90523C8.90692 3.48469 9.37667 3.95444 9.95613 3.95444C10.475 3.95444 10.9058 3.57787 10.9903 3.08314C11.8066 2.84774 12.3783 2.89916 12.6994 3.09749C13.0386 3.307 13.2721 3.81542 13.0387 4.82216C12.8098 5.80962 12.1687 7.04337 11.19 8.30528C10.2872 9.46932 9.1701 10.563 8.00924 11.4242C7.85403 11.309 7.69829 11.1888 7.54246 11.0635C6.45332 10.1883 5.44006 9.13558 4.63395 8.04889C5.08983 7.43435 5.61835 6.82198 6.2003 6.24003C6.39556 6.04477 6.39556 5.72819 6.2003 5.53293C6.00504 5.33766 5.68846 5.33766 5.49319 5.53293C4.96591 6.06021 4.47627 6.61494 4.03849 7.17937C3.33769 6.06253 2.95286 5.05034 2.89459 4.28651C2.86262 3.86738 2.9324 3.5722 3.04732 3.37607C3.15616 3.19032 3.3283 3.05298 3.5965 2.98067C4.17696 2.82416 5.14096 2.99647 6.36827 3.63487C7.57146 4.26073 8.8626 5.24974 10.0126 6.43768C10.2047 6.63609 10.5212 6.64122 10.7196 6.44915C10.918 6.25708 10.9232 5.94054 10.7311 5.74214C9.52047 4.49158 8.14491 3.43182 6.82973 2.74771C5.53869 2.07616 4.28848 1.75838 3.33617 2.01515C2.83799 2.14947 2.43782 2.43823 2.18452 2.87052C1.9373 3.29243 1.85513 3.80725 1.89749 4.36257C1.97977 5.44118 2.53563 6.74106 3.41055 8.04888C3.09627 8.51867 2.82218 8.98889 2.59626 9.44961C1.96985 10.727 1.6998 11.9623 2.02581 12.8839C2.197 13.3679 2.52392 13.7358 2.97831 13.9516C3.42032 14.1615 3.94762 14.2116 4.513 14.1415C5.55132 14.0129 6.77601 13.4726 8.00924 12.6476C8.97593 13.2942 9.9375 13.7661 10.8079 14.0017C11.9796 14.3189 13.0998 14.2252 13.7179 13.4017C14.2314 12.7178 14.2295 11.7357 13.9168 10.6895C14.0549 10.5119 14.1371 10.2887 14.1371 10.0463C14.1371 9.46682 13.6673 8.99707 13.0878 8.99707C12.5084 8.99707 12.0386 9.46682 12.0386 10.0463C12.0386 10.5935 12.4576 11.0429 12.9922 11.0912C13.2261 11.9404 13.141 12.5046 12.9182 12.8014C12.6798 13.119 12.1181 13.3204 11.0692 13.0365C10.4136 12.859 9.66391 12.5122 8.87876 12.0196C10.0149 11.1384 11.0939 10.0608 11.9802 8.91814C13.009 7.59159 13.7396 6.22667 14.0129 5.04802C14.2817 3.88865 14.1168 2.79755 13.2249 2.24668ZM3.49412 9.88989C3.64988 9.57224 3.83234 9.24694 4.03848 8.91841C4.86023 9.97789 5.85456 10.99 6.91605 11.843C6.99046 11.9028 7.06503 11.9617 7.13973 12.0196C6.09871 12.6728 5.14128 13.0561 4.39004 13.1491C3.94819 13.2039 3.62654 13.1524 3.4073 13.0483C3.20043 12.95 3.05381 12.7914 2.96856 12.5504C2.7817 12.0222 2.89898 11.1035 3.49412 9.88989ZM7.18854 7.99999C7.18854 7.5518 7.55186 7.18848 8.00005 7.18848C8.44824 7.18848 8.81157 7.5518 8.81157 7.99999C8.81157 8.44818 8.44824 8.81151 8.00005 8.81151C7.55186 8.81151 7.18854 8.44818 7.18854 7.99999ZM8.00005 6.18848C6.99958 6.18848 6.18854 6.99952 6.18854 7.99999C6.18854 9.00046 6.99958 9.81151 8.00005 9.81151C9.00052 9.81151 9.81157 9.00046 9.81157 7.99999C9.81157 6.99952 9.00052 6.18848 8.00005 6.18848Z"
                    fill="url(#paint0_linear_5380_77452)"
                />
                <defs>
                    <linearGradient
                        id="paint0_linear_5380_77452"
                        x1="1.88672"
                        y1="1.85602"
                        x2="16.6535"
                        y2="7.14405"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stopColor="#00BAC6" />
                        <stop offset="0.5" stopColor="#0067FF" />
                        <stop offset="1" stopColor="#450FDE" />
                    </linearGradient>
                </defs>
            </svg>
        </span>
    );
}

/**
 * @deprecated 后续迁移至 icon 库
 */
export function ReloadIcon({ className, ...rest }: IconProps) {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg
                xmlns="http://www.w3.org/2000/svg"
                width="1em"
                height="1em"
                fill="none"
                viewBox="0 0 16 16"
            >
                <path
                    fill="currentColor"
                    fillRule="evenodd"
                    d="M13.495 4.209a6.609 6.609 0 00-5.452-2.87 6.621 6.621 0 00-6.617 6.626 6.621 6.621 0 006.617 6.625 6.62 6.62 0 006.208-4.324.5.5 0 10-.938-.347 5.62 5.62 0 01-5.27 3.67 5.621 5.621 0 01-5.617-5.624A5.621 5.621 0 018.043 2.34a5.61 5.61 0 014.731 2.59l-.003.003L11.304 6.4h3.446V2.955L13.495 4.21z"
                    clipRule="evenodd"
                ></path>
            </svg>
        </span>
    );
}

/**
 * @deprecated 后续迁移至 icon 库
 */
export function PauseIcon({ className, ...rest }: IconProps) {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg
                xmlns="http://www.w3.org/2000/svg"
                width="1em"
                height="1em"
                fill="none"
                viewBox="0 0 16 16"
            >
                <path
                    fill="currentColor"
                    fillRule="evenodd"
                    d="M1.332 7.999a6.666 6.666 0 016.667-6.667 6.666 6.666 0 016.666 6.667A6.666 6.666 0 018 14.665 6.666 6.666 0 011.332 8zm12.333 0A5.666 5.666 0 008 2.332a5.665 5.665 0 00-5.667 5.667 5.666 5.666 0 005.667 5.666A5.666 5.666 0 0013.665 8zM6.972 6.125a.5.5 0 01.5.5v2.747a.5.5 0 01-1 0V6.625a.5.5 0 01.5-.5zm2.553.5a.5.5 0 10-1 0v2.747a.5.5 0 001 0V6.625z"
                    clipRule="evenodd"
                ></path>
            </svg>
        </span>
    );
}

/**
 * @deprecated 后续迁移至 icon 库
 */
export function RobotIcon({ className, ...rest }: IconProps) {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg
                xmlns="http://www.w3.org/2000/svg"
                width="1em"
                height="1em"
                fill="none"
                viewBox="0 0 268 265"
            >
                <path
                    fill="url(#paint0_linear_1290_3143)"
                    fillOpacity="0.03"
                    fillRule="evenodd"
                    d="M210.656 14.094c0-7.266-5.89-13.156-13.156-13.156-7.266 0-13.156 5.89-13.156 13.156V27.25h-72.36c-14.532 0-26.312 11.78-26.312 26.313V237.75c0 14.532 11.78 26.313 26.312 26.313h171.032c14.532 0 26.312-11.781 26.312-26.313V53.562c0-14.531-11.78-26.312-26.312-26.312h-72.36V14.094zm72.36 39.468H111.984V237.75h171.032V53.562zm-111.828 85.516c0 10.899-8.836 19.735-19.735 19.735s-19.734-8.836-19.734-19.735 8.835-19.734 19.734-19.734c10.899 0 19.735 8.835 19.735 19.734zm-105.25-32.89c0-7.267-5.89-13.157-13.157-13.157-7.266 0-13.156 5.89-13.156 13.157v78.937c0 7.266 5.89 13.156 13.156 13.156 7.266 0 13.157-5.89 13.157-13.156v-78.937zm-52.626 13.156c7.266 0 13.157 5.89 13.157 13.156v26.313c0 7.266-5.89 13.156-13.157 13.156-7.265 0-13.156-5.89-13.156-13.156V132.5c0-7.266 5.89-13.156 13.156-13.156zM394.844 132.5c0-7.266-5.89-13.156-13.156-13.156-7.266 0-13.157 5.89-13.157 13.156v26.313c0 7.266 5.891 13.156 13.157 13.156s13.156-5.89 13.156-13.156V132.5zm-52.625-39.469c7.266 0 13.156 5.89 13.156 13.157v78.937c0 7.266-5.89 13.156-13.156 13.156-7.266 0-13.156-5.89-13.156-13.156v-78.937c0-7.267 5.89-13.157 13.156-13.157zm-98.672 65.782c10.899 0 19.734-8.836 19.734-19.735s-8.835-19.734-19.734-19.734c-10.899 0-19.734 8.835-19.734 19.734 0 10.899 8.835 19.735 19.734 19.735z"
                    clipRule="evenodd"
                ></path>
                <defs>
                    <linearGradient
                        id="paint0_linear_1290_3143"
                        x1="0.156"
                        x2="415.745"
                        y1="0.938"
                        y2="225.356"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stopColor="#00BAC6"></stop>
                        <stop offset="0.5" stopColor="#0067FF"></stop>
                        <stop offset="1" stopColor="#450FDE"></stop>
                    </linearGradient>
                </defs>
            </svg>
        </span>
    );
}

/**
 * @deprecated 后续迁移至 icon 库
 */
export function SendIcon({ className, gradient, ...rest }: IconProps) {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg
                xmlns="http://www.w3.org/2000/svg"
                width="1em"
                height="1em"
                fill="none"
                viewBox="0 0 16 16"
            >
                <path
                    fill={gradient ? 'url(#secondary_linear_gradient)' : 'currentColor'}
                    d="M13.07 1.662a.547.547 0 11.86.676l-6.884 8.765v3.147a.547.547 0 01-.507.545l-.04.002a.547.547 0 01-.546-.547v-3.336c0-.123.041-.241.117-.338l7-8.914z"
                ></path>
                <path
                    fill={gradient ? 'url(#secondary_linear_gradient)' : 'currentColor'}
                    d="M13.488 1.271a.547.547 0 01.804.548L12.81 13.57a.547.547 0 01-.799.415l-3.81-2.027a.547.547 0 11.513-.965l3.11 1.654 1.25-9.902-9.92 5.425 2.169 1.149c.255.135.36.442.245.702l-.018.037a.547.547 0 01-.739.227L1.744 8.661a.547.547 0 01-.006-.963l11.75-6.427z"
                ></path>
            </svg>
        </span>
    );
}

/**
 * @deprecated 后续迁移至 icon 库
 */
export const CopyIcon = ({ className, ...rest }: IconProps) => {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16">
                <g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
                    <g transform="translate(-340 -367)">
                        <g transform="translate(201 320)">
                            <g transform="translate(139 47)">
                                <path
                                    fill="currentColor"
                                    d="M11 1.5A1.5 1.5 0 0112.5 3v.25h.5a1.5 1.5 0 011.5 1.5v8a1.5 1.5 0 01-1.5 1.5H5a1.5 1.5 0 01-1.5-1.5v-.25H3a1.5 1.5 0 01-1.493-1.356L1.5 11V3A1.5 1.5 0 013 1.5zm1.5 9.5a1.5 1.5 0 01-1.5 1.5H4.5v.25a.5.5 0 00.5.5h8a.5.5 0 00.5-.5v-8a.5.5 0 00-.5-.5h-.5zM11 2.5H3a.5.5 0 00-.5.5v8a.5.5 0 00.5.5h8a.5.5 0 00.5-.5V3a.5.5 0 00-.5-.5zm-4 1a.5.5 0 01.5.5v2.5H10a.5.5 0 110 1H7.5V10a.5.5 0 11-1 0V7.5H4a.5.5 0 010-1h2.5V4a.5.5 0 01.5-.5z"
                                ></path>
                            </g>
                        </g>
                    </g>
                </g>
            </svg>
        </span>
    );
};

/**
 * @deprecated 后续迁移至 icon 库
 */
export const GradientDotIcon = ({ className, ...rest }: IconProps) => {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg
                width="1em"
                height="1em"
                viewBox="0 0 6 6"
                fill="none"
                xmlns="http://www.w3.org/2000/svg"
            >
                <path
                    d="M0 3C0 1.34315 1.34315 0 3 0C4.65685 0 6 1.34315 6 3C6 4.65685 4.65685 6 3 6C1.34315 6 0 4.65685 0 3Z"
                    fill="url(#paint0_linear_5253_12831)"
                />
                <circle cx="3" cy="3" r="3" fill="url(#paint1_linear_5253_12831)" />
                <defs>
                    <linearGradient
                        id="paint0_linear_5253_12831"
                        x1="0"
                        y1="0"
                        x2="7.2238"
                        y2="2.60057"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stopColor="#08C4FF" />
                        <stop offset="0.5" stopColor="#4892FF" />
                        <stop offset="1" stopColor="#8A61FF" />
                    </linearGradient>
                    <linearGradient
                        id="paint1_linear_5253_12831"
                        x1="0"
                        y1="0"
                        x2="7.2238"
                        y2="2.60057"
                        gradientUnits="userSpaceOnUse"
                    >
                        <stop stopColor="#08C4FF" />
                        <stop offset="0.5" stopColor="#4892FF" />
                        <stop offset="1" stopColor="#8A61FF" />
                    </linearGradient>
                </defs>
            </svg>
        </span>
    );
};

/**
 * @deprecated 后续迁移至 icon 库
 */
export const ShiningIcon = ({ className, ...rest }: IconProps) => {
    return (
        <span className={classNames('dtc__icon', className)} {...rest}>
            <svg
                xmlns="http://www.w3.org/2000/svg"
                width="1em"
                height="1em"
                viewBox="0 0 16 16"
                fill="none"
            >
                <path
                    fillRule="evenodd"
                    clipRule="evenodd"
                    d="M6.80139 4.01428C6.91344 4.08174 7.02979 4.20793 7.0606 4.39456C7.12661 4.79444 7.24827 5.39735 7.45065 5.99485C7.65697 6.60401 7.92845 7.14998 8.26421 7.48575C8.59998 7.82151 9.14595 8.09299 9.75511 8.29931C10.3526 8.50169 10.9555 8.62335 11.3554 8.68936C11.542 8.72017 11.6682 8.83652 11.7357 8.94856C11.7986 9.05301 11.8184 9.16175 11.8184 9.24998C11.8184 9.3382 11.7986 9.44694 11.7357 9.55139C11.6682 9.66344 11.542 9.77979 11.3554 9.8106C10.9555 9.87661 10.3526 9.99827 9.75511 10.2006C9.14595 10.407 8.59998 10.6784 8.26421 11.0142C7.92845 11.35 7.65697 11.896 7.45065 12.5051C7.24827 13.1026 7.12661 13.7055 7.0606 14.1054C7.02979 14.292 6.91344 14.4182 6.80139 14.4857C6.69694 14.5486 6.58821 14.5684 6.49998 14.5684C6.41176 14.5684 6.30302 14.5486 6.19857 14.4857C6.08652 14.4182 5.97017 14.292 5.93936 14.1054C5.87335 13.7055 5.75169 13.1026 5.54931 12.5051C5.34299 11.896 5.07151 11.35 4.73575 11.0142C4.39998 10.6784 3.85401 10.407 3.24485 10.2006C2.64735 9.99827 2.04444 9.87661 1.64456 9.8106C1.45793 9.77979 1.33174 9.66344 1.26428 9.55139C1.2014 9.44694 1.18152 9.33821 1.18152 9.24998C1.18152 9.16176 1.2014 9.05302 1.26428 8.94857C1.33174 8.83652 1.45793 8.72017 1.64456 8.68936C2.04444 8.62335 2.64735 8.50169 3.24485 8.29931C3.85401 8.09299 4.39998 7.82151 4.73575 7.48575C5.07151 7.14998 5.34299 6.60401 5.54931 5.99485C5.75169 5.39735 5.87335 4.79444 5.93936 4.39456C5.97017 4.20793 6.08652 4.08174 6.19856 4.01428C6.30301 3.9514 6.41175 3.93152 6.49998 3.93152C6.5882 3.93152 6.69694 3.9514 6.80139 4.01428ZM6.49998 6.30524C6.49881 6.30871 6.49763 6.31218 6.49646 6.31566C6.2741 6.97215 5.94229 7.69342 5.44285 8.19285C4.94342 8.69229 4.22215 9.0241 3.56566 9.24646C3.56218 9.24763 3.55871 9.24881 3.55524 9.24998C3.55871 9.25115 3.56218 9.25233 3.56566 9.2535C4.22215 9.47586 4.94342 9.80767 5.44285 10.3071C5.94229 10.8065 6.2741 11.5278 6.49646 12.1843C6.49763 12.1878 6.49881 12.1912 6.49998 12.1947C6.50115 12.1912 6.50233 12.1878 6.5035 12.1843C6.72586 11.5278 7.05767 10.8065 7.5571 10.3071C8.05654 9.80767 8.77781 9.47586 9.4343 9.2535C9.43778 9.25233 9.44125 9.25115 9.44472 9.24998C9.44125 9.24881 9.43778 9.24763 9.4343 9.24646C8.77781 9.0241 8.05654 8.69229 7.5571 8.19285C7.05767 7.69342 6.72586 6.97215 6.5035 6.31566C6.50233 6.31218 6.50115 6.30871 6.49998 6.30524Z"
                    fill="currentColor"
                />
                <path
                    fillRule="evenodd"
                    clipRule="evenodd"
                    d="M12.1546 1.04302C12.2605 1.10678 12.3724 1.2274 12.402 1.40662C12.4338 1.59929 12.4919 1.8862 12.5871 2.16729C12.6863 2.46003 12.8069 2.68919 12.9339 2.81616C13.0608 2.94312 13.29 3.06378 13.5828 3.16293C13.8638 3.25814 14.1507 3.31627 14.3434 3.34808C14.5226 3.37766 14.6433 3.4895 14.707 3.59539C14.7662 3.69369 14.7842 3.79462 14.7842 3.87505C14.7842 3.95547 14.7662 4.05641 14.707 4.1547C14.6433 4.2606 14.5226 4.37244 14.3434 4.40202C14.1507 4.43383 13.8638 4.49196 13.5828 4.58717C13.29 4.68632 13.0608 4.80698 12.9339 4.93394C12.8069 5.06091 12.6863 5.29007 12.5871 5.58282C12.4919 5.8639 12.4338 6.15081 12.402 6.34348C12.3724 6.5227 12.2605 6.64332 12.1546 6.70708C12.0564 6.76626 11.9554 6.78428 11.875 6.78428C11.7946 6.78428 11.6936 6.76626 11.5953 6.70708C11.4894 6.64333 11.3776 6.5227 11.348 6.34348C11.3162 6.15081 11.2581 5.8639 11.1629 5.58282C11.0637 5.29007 10.9431 5.06091 10.8161 4.93394C10.6891 4.80698 10.46 4.68633 10.1672 4.58717C9.88614 4.49196 9.59923 4.43383 9.40656 4.40202C9.22734 4.37244 9.10672 4.2606 9.04296 4.15471C8.98378 4.05641 8.96576 3.95548 8.96576 3.87505C8.96576 3.79463 8.98378 3.69369 9.04296 3.5954C9.10672 3.48951 9.22734 3.37766 9.40656 3.34808C9.59923 3.31627 9.88614 3.25814 10.1672 3.16293C10.46 3.06378 10.6891 2.94312 10.8161 2.81616C10.9431 2.68919 11.0637 2.46003 11.1629 2.16729C11.2581 1.8862 11.3162 1.59929 11.348 1.40662C11.3776 1.2274 11.4894 1.10678 11.5953 1.04303C11.6936 0.983846 11.7946 0.965821 11.875 0.96582C11.9554 0.96582 12.0563 0.983844 12.1546 1.04302ZM11.875 3.03802C11.7804 3.21305 11.6648 3.38167 11.5232 3.52327C11.3816 3.66486 11.213 3.78044 11.038 3.87505C11.213 3.96967 11.3816 4.08524 11.5232 4.22684C11.6648 4.36844 11.7804 4.53705 11.875 4.71208C11.9696 4.53705 12.0852 4.36844 12.2268 4.22684C12.3684 4.08524 12.537 3.96967 12.712 3.87505C12.537 3.78044 12.3684 3.66486 12.2268 3.52327C12.0852 3.38167 11.9696 3.21305 11.875 3.03802Z"
                    fill="currentColor"
                />
            </svg>
        </span>
    );
};
